<?php
namespace app\common\model;
use think\Model;

class FirmStyleModel extends Model{
    protected  $name = 'firm_style';
    protected  $pk   = 'firm_id';
    
    // 设置json类型字段
    protected $json = ['global','card','menu','page'];
    // 设置JSON数据返回数组
    protected $jsonAssoc = true;

    public static function onBeforeInsert($model)
    {
        $model->set("create_ip", request()->ip());
    }

    // public function getExpireTimeDateAttr($value){
    //     return date('Y-m-d',$value);
    // }
}